package com.bookcloud.java21.chapter4.继承extends基础知识47;

public class TestAnimal {
  public static void main(String[] args) {
    Cat cat = new Cat();
    cat.setName("小白猫");
    cat.setAge(1);
    cat.eat();
    cat.sleep();
    cat.run();
    cat.skill();
    // dog
    Dog dog = new Dog();
    dog.setName("小白狗");
    dog.setAge(1);
    dog.eat();
    dog.sleep();
    dog.run();
    dog.func();
  }
}
